<SCRIPT language=JavaScript>
var message="";
function clickIE() {if (document.all) {(message);return false;}}
function clickNS(e) {if 
(document.layers||(document.getElementById&&!document.all)) {
if (e.which==2||e.which==3) {(message);return false;}}}
if (document.layers) 
{document.captureEvents(Event.MOUSEDOWN);document.onmousedown=clickNS;}
else{document.onmouseup=clickNS;document.oncontextmenu=clickIE;}

document.oncontextmenu=new Function("return false")
</SCRIPT>
<?
session_start();
include("db.php");
if(!isset($_SESSION['login'])){
	echo "<script>window.location='home.php'</script>";
}
else{
	$senha=$_SESSION['senha'];
	$login=$_SESSION['login'];
	$accinfo = mssql_query("SELECT * FROM MEMB_INFO WHERE memb___id = '$login'");
	$row=mssql_fetch_array($accinfo);
	$charinfo = mssql_query("SELECT Name,Resets,cLevel FROM Character WHERE AccountID = '$login'");
	$totchars=mssql_num_rows($charinfo);
}
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Untitled Document</title>
<style type="text/css">
<!--
/* Hyperlink */
a:link {	color: #FFFFFF;	text-decoration: none;}
a:visited {	color: #FFFFFF; text-decoration: none;}
a:hover {	color: orange; text-decoration: underline;}
a:active {	color: #FFFFFF; text-decoration: none;}
.camposs {	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 9px;
	background-color: #999999;
	border: 1px solid #666666;
}
body,td,th {
	font-family: Verdana, Arial, Helvetica, sans-serif;
	color: #ffffff;
	font-size: 12px;
}
body {
  scrollbar-arrow-color: #FF9900;
  scrollbar-3dlight-color: #FFFFFF;
  scrollbar-highlight-color: #000000;
  scrollbar-face-color: #FFFFFF;
  scrollbar-shadow-color: #000000;
  scrollbar-darkshadow-color: #FFFFFF;
  scrollbar-track-color: #cdcdcd;
	background-color: #000000;
}
.style1 {color: #000000}
-->
</style>
<body background=images/fundo2.JPG>
<center>
<span class="style1"><font size="3"><strong>Ol&aacute; <? echo "$row[memb_name]" ?></strong></font>
</span>
<p class="style1">
<?
if($totchars>0){
echo "
<font size=2><strong>Voce tem $totchars personagen(s) na sua conta</strong></font>
<p>
<table width=85% height=0 border=1 align=center bordercolor=#cdcdcd>
  <tr>
    <td bordercolor=black bgcolor=#999999 width=50%><font size=2 color=black><strong>Nome</strong></td>
    <td bordercolor=black bgcolor=#999999><font size=2 color=black><strong>Level(<font color=red>resets<font color=black>)</strong></td>
  </tr>
  <tr>";
  for($i=0;$i < mssql_num_rows($charinfo);++$i)
			{
			$row2 = mssql_fetch_row($charinfo);
 if($row2[1]<1){ $row2[1] = '0'; 
}
			echo "
  <tr>

<form method='POST' action=../charinfo.php>
<td align=center bordercolor=black>
<input type=hidden name=char value=$row2[0]>
<input type=submit class=camposs value=$row2[0]>
</td>
</form>
 <td bordercolor=black>$row2[2](<font color=red>$row2[1]</font><font color=white>)</td>
  </tr>
";
}
}
else{ echo "<font size=2><strong>Voce não tem nem um personagem na tua conta</strong></font>"; }
echo "
  </tr>
</table>";
?>
